package com.BlogPark.service.ShowArticleService;

import com.BlogPark.pojo.Article;
import com.BlogPark.pojo.Comment;
import com.BlogPark.pojo.User;

import java.util.Date;
import java.util.List;
import java.util.Map;

public interface ShowArticleService {
    //展示文章详情界面

    //展示标题
    String ShowTitle(String articleId) throws Exception;

    //展示分类 / 标签
    String ShowLabels(String articleId) throws Exception;

    //展示浏览量 收藏量  创作时间
    int ShowViews(String articleId) throws Exception;

    int ShowCollections(String articleId) throws Exception;

    Date ShowDate(String articleId) throws Exception;

    //展示内容
    String ShowContent(String articleId) throws Exception;

    //展示作者信息 粉丝数 浏览量 点赞量 评论量 收藏量
    String ShowNickname(Integer userId) throws Exception;

    int ShowUserFans(Integer userId) throws Exception;

    int ShowUserViews(Integer userId) throws Exception;

    int ShowUserLikes(Integer userId) throws Exception;

    int ShowUserComments(Integer userId) throws Exception;

    int ShowUserCollections(Integer userId) throws Exception;


    //点赞功能
    boolean isLikes(User user, String articleId) throws Exception;

    void Likes(User user, String articleId) throws Exception;

    //评论功能
    boolean AddComments(User user, String articleId, String comment) throws Exception;

    boolean DeleteComments(User user, String commentId) throws Exception;

    //收藏功能
    boolean AddCollection(User user, String articleId) throws Exception;

    boolean DeleteCollection(User user, String articleId) throws Exception;

    //展示评论
    Map<String, List<Comment>> ShowComments(String articleId) throws Exception;

    //根据用户id查看用户的所有文章
    List<Article> ShowUserArticle(int userId) throws Exception;

    //是否收藏
    boolean isCollection(User user, String articleId) throws Exception;
}
